#!/bin/bash

# for description see:
# /usr/share/modalai/voxl-camera-server/custom_camera_config.txt
#
# D0006 sentinel has front stereo cameras mounted upside down
# rears are upright. In system image 1.6.x and prior the flip happened in
# the low level driver. In system image 1.7.x this was fixed and the rotate
# can be done by camera server

## not used anymore, used to check system image version here
# sys_version=$(head -c 3 "/etc/version")
# if [[ "$sys_version" == "1.6" ]] || [[ "$sys_version" == "1.5" ]]; then
#     echo "detected legacy qrb5165 system image, not rotating sentinel front stereo"
# fi



## front stereo pair mounted upside down
J6_LOWER_SENSOR="ov7251-combo"
J6_LOWER_NAME="stereo_front"
J6_LOWER_COMBO_MODE="left-right"
J6_LOWER_ROTATE="true"


J7_LOWER_SENSOR="ov7251"
J7_LOWER_NAME="tracking"
J7_LOWER_ROTATE="false"


J7_UPPER_SENSOR="imx214"
J7_UPPER_NAME="hires"
J7_UPPER_ROTATE="false"


## read stereo pair is mounted backwards right-left instead of normally left-right
J8_LOWER_SENSOR="ov7251-combo"
J8_LOWER_NAME="stereo_rear"
J8_LOWER_COMBO_MODE="right-left"
J8_LOWER_ROTATE="false"
